using B.S.BaseData.Infrastructure.Implement;
using B.S.BaseData.Infrastructure.Interface;
using B.S.BaseData.Infrastructure;
using Microsoft.EntityFrameworkCore;
using System.Reflection;
using Yitter.IdGenerator;
using IGeekFan.AspNetCore.Knife4jUI;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.IdentityModel.Tokens;
using System.Text;
using Microsoft.OpenApi.Models;
using NLog.Web;

namespace B.S.BaseData.Api.Read
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var builder = WebApplication.CreateBuilder(args).Inject();


            var app = builder.Build();
            
            //ע
            app.UseCors(x => x.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod());
             
            // Configure the HTTP request pipeline.
                app.UseSwagger();
                //app.UseSwaggerUI();
                app.UseKnife4UI();

            // 鉴权
            app.UseAuthentication();

            app.UseAuthorization();



            app.MapControllers();

            app.Run();
        }
    }
}
